home *** CD-ROM | disk | FTP | other *** search
/ Ray Dream Studio 5 / Ray Dream.iso / pc / DreamSDK / Windows / SAMPLES / TWEENER / TWEN / COMTWEN.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-11  |  2.3 KB  |  69 lines

  1. /*$Id: COMTwen.h 1.3 1997/04/04 03:12:53 damien Exp $*/
  2.  
  3. //
  4. // COM Example of a Tweener
  5. //
  6.  
  7. #ifndef __COMTWEN__
  8. #define __COMTWEN__  
  9.  
  10. #ifndef __I3DEXTWN__
  11. #include "I3DExTwn.h"
  12. #endif
  13.                   
  14. // define the Tweener CLSID
  15.  
  16. // {97D56B80-FE78-11ce-A4F7-0000E202D5A5}
  17. DEFINE_GUID(CLSID_Tweener,0x97d56b80,0xfe78,0x11ce,0xa4,0xf7,0x0,0x0,0xe2,0x2,0xd5,0xa5);
  18.  
  19.  
  20.  
  21. typedef struct TweenerData {
  22.   short fNbOsc;
  23.   NUM3D fExpCoef;
  24.   } TweenerData;
  25.  
  26.  
  27. // Tweener Object :
  28. #undef INTERFACE
  29. #define INTERFACE Tweener
  30. class Tweener : public I3DExTweener {
  31. public :  
  32.   Tweener();
  33.   ~Tweener();
  34.   
  35.   // IUnknown Interface :
  36.   STDMETHODIMP         QueryInterface(THIS_ REFIID riid, LPVOID* ppvObj);
  37.   STDMETHODIMP_(ULONG) AddRef(THIS);
  38.   STDMETHODIMP_(ULONG) Release(THIS);
  39.   
  40.   // I3DExtension method :
  41.   STDMETHODIMP_(I3DExtension*) Clone(THIS);
  42.   STDMETHODIMP                 ShellUtilitiesInit(THIS_ IShUtilities* shellUtilities);  
  43.   
  44.   // I3DExDataExchanger methods :
  45.   STDMETHODIMP_(ExtensionDataMap*) GetExtensionDataMap(THIS);
  46.   STDMETHODIMP_(void*)             GetExtensionDataBuffer(THIS);
  47.   STDMETHODIMP                     ExtensionDataChanged(THIS);
  48.   STDMETHODIMP                     HandleEvent(THIS_ ULONG sourceID);
  49.   STDMETHODIMP_(short)             GetResID(THIS);
  50.   
  51.   // I3DExTweener methods
  52.   STDMETHODIMP DoTweening (THIS_ NUM3D &res,long time,long time1,long time2);
  53.     STDMETHODIMP DoTween (THIS_ IShKeyFrame *res,long time,XTweenerChainLink *alink);
  54.     STDMETHODIMP Draw (THIS_ IShGraphicDevice *aGD,const LRect *area,const LRect *where);
  55.     STDMETHODIMP DoValue (THIS_ NUM3D &res,long time,XTweenerChainLink *alink,I3DShTreeElement *tree);
  56.     STDMETHODIMP DoVector2 (THIS_ VECTOR2D &res,long time,XTweenerChainLink *alink,I3DShTreeElement *tree);
  57.     STDMETHODIMP DoVector3 (THIS_ VECTOR3D &res,long time,XTweenerChainLink *alink,I3DShTreeElement *tree);
  58.     STDMETHODIMP DoColor (THIS_ COLOR3D &res,long time,XTweenerChainLink *alink,I3DShTreeElement *tree);
  59.     STDMETHODIMP DoRotation (THIS_ MATRIX3D &res,long time,XTweenerChainLink *alink,I3DShTreeElement *tree);
  60. private :
  61.   ULONG           fCRef;      // reference Counter
  62.   TweenerData     fData;   // Tweener Data
  63.   double          fCosCoef;
  64.   double          fExpCoef;
  65.   };
  66.  
  67.  
  68. #endif
  69.